/*
 *    Copyright (c) 2018-2025, nart All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: nart
 */

package com.nai365.nart.member.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 钱包表
 *
 * @author baogs
 * @date 2022-07-07 09:46:29
 */
@Data
@TableName("ums_wallet")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "钱包表")
public class Wallet extends Model<Wallet> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value="id")
    private Long id;

    /**
     * 用户id
     */
    @ApiModelProperty(value="用户id")
    private Long userId;

    /**
     * nice余额
     */
    @ApiModelProperty(value="积分")
    private BigDecimal nartBalance;

    /**
     * rmb余额
     */
    @ApiModelProperty(value="rmb余额")
    private BigDecimal rmbBalance;

    /**
     * 乐观锁
     */
    @Version
    @ApiModelProperty(value="乐观锁")
    private Integer version;

    /**
     * 手机号
     */
    @ApiModelProperty(value="手机号")
    private String phone;

    /**
     * newNartBalance
     */
    @ApiModelProperty(value="newNartBalance")
    private BigDecimal newNartBalance;

    /**
     * newRmbBalance
     */
    @ApiModelProperty(value="newRmbBalance")
    private BigDecimal newRmbBalance;

    /**
     * freezeNart
     */
    @ApiModelProperty(value="freezeNart")
    private BigDecimal freezeNart;

    /**
     * 0为待审核，1为同意，2为拒绝
     */
    @ApiModelProperty(value="0为待审核，1为同意，2为拒绝")
    private Integer type;

    /**
     * operateBy
     */
    @ApiModelProperty(value="operateBy")
    private Long operateBy;

    /**
     * reason
     */
    @ApiModelProperty(value="reason")
    private String reason;

    /**
     * freezeReason
     */
    @ApiModelProperty(value="freezeReason")
    private String freezeReason;

    /**
     * 用户实名
     */
    @ApiModelProperty(value="用户实名")
    private String realname;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private LocalDateTime updateTime;


	@TableField(exist = false)
	private BigDecimal nartValue = new BigDecimal(0);

	@TableField(exist = false)
	private BigDecimal rmbValue =new BigDecimal(0);
}
